package com.neuedu.weatherapi.controller;
import com.neuedu.weatherapi.pojo.WeatherCountTable;
import com.neuedu.weatherapi.service.WeatherCountTableService;
import com.neuedu.weatherapi.util.ResponseBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class WeatherCountTableController {
    @Autowired
    private WeatherCountTableService weatherCountTableService;
    @GetMapping("/queryAllWeatherCountTable")
    public ResponseBody<List<WeatherCountTable>> queryAllWeatherCountTable(){
        List<WeatherCountTable> weatherCountTables=weatherCountTableService.queryAllWeatherCountTable();
        ResponseBody responseBody=new ResponseBody("200","成功",weatherCountTables);
        return responseBody;
    }
}